﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.ComponentModel.Design;
using System.ComponentModel.Design.Serialization;

namespace MF.Designer.Test
{
    public partial class DesignForm : Form
    {
        public DesignForm()
        {
            InitializeComponent();
        }

        private void btndesign_Click(object sender, EventArgs e)
        {
            DesignSurface ds = new DesignSurface();
            
            ds.BeginLoad(typeof(Form));
            Control c = ds.View as Control;
            c.Parent = panel1;
            c.Dock = DockStyle.Fill;
            IDesignerHost idh = (IDesignerHost)ds.GetService(typeof(IDesignerHost));
           
            Button b = (Button)idh.CreateComponent(typeof(Button));
            b.Parent = (Control)idh.RootComponent;
            b = (Button)idh.CreateComponent(typeof(Button));
            b.Parent = (Control)idh.RootComponent;
            BasicDesignerLoader bdl;
            bdl.BeginLoad

        }
    }
}
